import request from './request'

const basePath = 'http://localhost:4000/app_api'
// const basePath = 'https://api.moka360.vip/app_api'

const api = {
  findShops: (params) => request.get('/shop/query', params),
  getOpenid: (params) => request.get('/mini_app/get_openid', params),
  createWxUser: (params) => request.post('/user/create_wx_user', params),
  createWxUserV1: (params) => request.post('/user/create_wx_user_v1', params),
  bindCard: (params) => request.post('/user/bind_card', params),
  findCoupons: (params) => request.get('/coupon/find_by_openid', params),
  getUserByOpenid: (params) => request.get('/user/get_by_openid', params),
  getUserByUnionId: (params) => request.get('/user/get_by_union_id', params),
  updatePasswd: (params) => request.post('/user/update_passwd', params),
  findPayTrans: (params) => request.get('/pay_transaction/query', params),
  findRechargeTrans: (params) => request.get('/recharge_transaction/query', params),
  getPayCode: (params) => request.get('/member_pay_code/gen_pay_code', params),
  findRechPackage: (params) => request.get('/recharge_package/query', params),
  wechatMiniRecharge: (params) => request.post('/recharge/wechat_mini_recharge', params),
  findProducts: (params) => request.get('/product/categories_products', params),
  findProductAttrs: (params) => request.get('/product/product_attrs/query', params),
  getMemberDay: (params) => request.get('/member_day/get', params),
  findFullReduce: (params) => request.get('/full_reduce/get', params),
  findFightGroupTpls: (params) => request.get('/fight_group_tpl/query', params),
  getFightCroupTpl: (params) => request.get('/fight_group_tpl/get', params),
  getFightCroup: (params) => request.get('/fight_group/get', params),
  createFightGroup: (params) => request.post('/fight_group/create', params),
  joinFightGroup: (params) => request.post('/fight_group/join', params),
  getTotalFightingNum: (params) => request.get('/fight_group/get_total_fighting_num', params),
  findFightingGroups: (params) => request.get('/fight_group/find_fighting_groups', params),
  findGroupByStatus: (params) => request.get('/fight_group/findByStatus', params),
  payCenter: (params) => request.post('/pay_center/pay', params),
  findMiaoShas: (params) => request.get('/miaosha/query', params),
  gainCoupon: (params) => request.post('/coupon_center/create_coupon', params),
  judgeOwnCoupon: (params) => request.post('/coupon_center/judge_coupon', params),
  findPointsMallProducts: (params) => request.get('/product/points_mall/query', params),
  getOrder: (params) => request.get('/order/get', params),
  findOrder: (params) => request.get('/order/query', params),
  findCardPrerogatives: (params) => request.get('/card_prerogative/find', params),
  submitMiaoShaOrder: (params) => request.post('/miaosha/submit_order', params),
  payMiaoShaOrder: (params) => request.post('/miaosha/pay_order', params),
  findWechatCards: (params) => request.get('/wechat_card/query', params),
  wechatDecryptData: (params) => request.post('/wechat/decrypt_data', params),
  wechatDecryptPhoneData: (params) => request.post('/wechat/decrypt_phone_data', params),
  wechatDecryptCode: (params) => request.post('/wechat/decrypt_code', params),
  getWechatCardTicket: (params) => request.get('/wechat/get_card_ticket', params),
  wechatCardActivate: (params) => request.post('/wechat_card/activate', params),
  saveFeedback: (params) => request.post('/feedback/save', params),
  microPay: (params) => request.post('/pay_center/micro_pay', params),
  getShop: (params) => request.get('/shop/get', params),
  getPayCenterMricoPrepay: (params) => request.get('/pay_center/micro_prepay', params),
  postPayCenterPrepay: (params) => request.post('/pay_center/prepay', params),
  findCheckIn: (params) => request.get('/check_in/find', params),
  getUserCheckInByUserId: (params) => request.get('/user_check_in/get_by_user', params),
  userCheckIn: (params) => request.get('/user_check_in/check_in', params),
  findSaleCards: (params) => request.get('/sale_card/query', params),
  paySaleCardRecord: (params) => request.post('/sale_card_record/pay', params),
  findCouponShareByOrderId: (params) => request.get('/coupon/find_share_by_order_id', params),
  giftShare: (params) => request.post('/share/gift', params),
  getShareByOrderId: (params) => request.get('/share/get_by_order_id', params),
  exchangeProduct: (params) => request.get('/points_mall/exchange', params),
  getInvitation: (params) => request.get('/invitation/get', params),
  getNewUserGifts: (params) => request.get('/new_user_gifts/get', params),
  receiveNewUserGifts: (params) => request.get('/new_user_gifts/receive', params),
  findBargain: (params) => request.get('/bargain/query', params),
  helpBargain: (params) => request.post('/bargain/help', params),
  submitBargain: (params) => request.post('/bargain/submit', params),
  findBargainOrder: (params) => request.get('/order/find_bargain', params),
  getBargainOrder: (params) => request.get('/order/get_bargain', params),
  setBargainInfo: (params) => request.post('/bargain/set_info', params),
  saveAddress: (params) => request.post('/address/save', params),
  findAddress: (params) => request.get('/address/query', params),
  getAddress: (params) => request.get('/address/get_by_id', params),
  payBargainOrder:(params)=>request.post('/bargain/pay',params),
  findGiftCardTpls: (params) => request.get('/gift_card_tpl/query', params),
  getGiftCardTpls: (params) => request.get('/gift_card_tpl/get', params),
  payGiftCard: (params) => request.post('/gift_card/pay', params),
  getGiftCard: (params) => request.get('/gift_card/get', params),
  receiveGiftCard: (params) => request.get('/gift_card/receive', params),
  receiveGiftRecord: (params) => request.get('/gift_card/receive_record', params),
}
export default api
